package cn.xllyd.service.impl;

import cn.xllyd.domain.Driver;
import cn.xllyd.mapper.DriverMapper;
import cn.xllyd.result.JSONResult;
import cn.xllyd.service.IDriverService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author mylxx
 * @since 2022-12-09
 */
@Service
public class DriverServiceImpl extends ServiceImpl<DriverMapper, Driver> implements IDriverService {

    @Override
    public JSONResult enter(Driver driver) {
        // 参数校验

        // 图像验证码

        // 短信验证码


        driver.setName(driver.getName());
        driver.setPhone(driver.getPhone());
        driver.setSex(driver.getSex());
        driver.setAge(driver.getAge());
        driver.setDriverNum(driver.getDriverNum());
        driver.setMotorcyleType(driver.getMotorcyleType());
        return JSONResult.success(insert(driver));
    }
}
